<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!--门诊、工号、开单医生、科室、开单次数、费用-->
<style>
    body{
        width:100%;
        height:100%;
    }
</style>
<link rel="stylesheet" href="../lib/layui-v2.1.6/layui/css/layui.css">
<body>
<table class="layui-table" lay-skin="line row" id="branchcostReportTable" lay-filter="tableListen">
</table>
</body>
<script type="text/javascript" src="../lib/jquery.min.js"></script>
<script type="text/javascript" src="../lib/layui-v2.1.6/layui/layui.js"></script>
<script>
    var tableWidth=window.innerWidth*0.248;
    //alert(parent.$('#hiddenName').val()); //获取父框的传值
    layui.use(["table"],function () {
        var $=layui.jquery;
        var table=layui.table;
        initTable();//初始化表格数据 ps :请求参数写死的

        //初始化表格数据 
        function initTable() {
            var rowInfo = JSON.parse(localStorage.getItem("rowInfo"));
            var clinicFundReport = JSON.parse(localStorage.getItem("clinicFundReport"));
            var param = {
                clinicId : rowInfo.clinicId,
                projectId : rowInfo.projectId,
                startTime : clinicFundReport.startTime,
                endTime : clinicFundReport.endTime,
            };
            table.render({
                elem: '#branchcostReportTable' //指定原始表格元素选择器（推荐id选择器),
                ,page:true
                ,limit:10
                ,center:true
                ,cols: [[
                    {field:'operatorCode',width:tableWidth,title:'工号',align:'center'},
                    {field:'operatorName',width:tableWidth,title:'录入人员',align:'center'},
                    {field:'price',width:tableWidth,title:'费用',align:'center'},
                    {field:'dateTime',width:tableWidth,title:'时间',align:'center'},
                ]],
                url : "../reportController/getClinicFundDetail",
                method : "post",
                 where : param,
                 response : {
                   statusName : "code", //数据状态的字段名称
                   statusCode : 200, //成功的状态码
                   countName: 'total', //数据总数的字段名称
                   msgName  : "msg", //状态信息的字段名称
                   dataName : "result" //数据列表的字段名称 
               }
            });
        }

    });
</script>
</html>